function onEditCustomer(frmID,page)
{
	var newId = '';
	var content = null;
	var ret = 2;
	$(frmID).request(
		{	
			asynchronous: false,
			parameters: $(frmID).serialize(true),
	  		onComplete: function(transport)
	  		{ 
			  	var response = transport.responseText || "";
				var pos=response.indexOf('<!');
				content=response.substring(0,pos);
		    	//alert(content);
		    	if(content != "")
		    	{
		    		obj = content.evalJSON();
		    		ret=0;
					arr = obj.message;
					for (key in arr){
						var diverr= document.getElementById('err_'+key);
						if(diverr && arr[key]!=""){
							diverr.update(arr[key]);
							diverr.style.display ="block";
               			//alert(key); 
						}else{
							diverr.update('');	
							diverr.style.display ="none";	
						}
					}
					
		    	}
		    	if(content == "")
		    	{
		    		ret=2;
		    	}
	  		}
		});
	//alert(ret);
	if(ret==2)
	{
		document.location = page;
	}
	
	return false;
}